<h1>Listing users</h1>

<table>
  <tr>
  	<th>Rank</th>
    <th>UserName</th>
    <th>Email</th>
    <th>Karma</th>
  </tr>

<% @count=0 %>
<% for @user in @users %>
  <tr id="user_row">
  	<td><% @count=1+@count %><%= @count %></td>
    <td title="show profile"><%= link_to @user.username, :action=>"show", :id=>@user.id %></td>
    <td>
   		<% if @user.showmail then %>
    		<%= link_to @user.email, "mailto:"+@user.email %>
		<% else %>
			--not shown--
		<% end %>
	</td>
    <td><%=h @user.karma %></td>
    <td><%= render :partial => 'generalTemplates/see_others_shared_resources'  %></td> 
    <% if(session[:user_id] == @user.id) then %><td> <%= link_to 'Edit', edit_user_path(@user) %> </td><% end %>
    <!-- <td><%= link_to 'Destroy', @user, :confirm => 'Are you sure?', :method => :delete %></td> -->
   	
  </tr>
<% end %>
</table>

<br />
